{extend name="index/base" /}

{block name="container"}
<div class="container">
    <div class="logo">
        <a href="./index.html">后台管理</a></div>
    <div class="left_open">
        <a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
    </div>
    <ul class="layui-nav left fast-add" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;">网站基本信息编辑</a>
            <dl class="layui-nav-child">
                <!-- 二级菜单 -->
                <dd>
                    <a onclick="xadmin.add_tab('网站信息编辑','/admin/info/infoedit')">
                        网站信息编辑
                    </a>
                </dd>
                <dd>
                    <a onclick="xadmin.add_tab('合作链接编辑','/admin/info/unitsedit')">
                        合作链接
                    </a>
                </dd>
                <dd>
                    <a onclick="xadmin.add_tab('微信二维码','/admin/info/weichatedit')">
                        微信二维码
                    </a>
                </dd>
                <dd>
                    <a onclick="xadmin.add_tab('账号修改','/admin/admin/accountEdit')">
                        账号修改
                    </a>
                </dd>
            </dl>
        </li>
    </ul>
    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item to-index">
            <a href="/" target="_blank">前台首页</a>
        </li>
        <li class="layui-nav-item to-index">
            <a href="javascript:;" onclick="logout()">退出登录</a>
        </li>
    </ul>
</div>
<script>
    function logout() {
        window.location.href = '/admin/logout'
        sessionStorage.clear()
        localStorage.clear()
    }
</script>
{/block}
{block name="menu"}
<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">
            <li>
                <a href="javascript:;" onclick="xadmin.add_tab('轮播图','/admin/banner')">
                    <i class="iconfont left-nav-li" lay-tips="轮播图">&#xe723;</i>
                    <cite>轮播图</cite>
                </a>
            </li>
            {volist name="list" id="vo"}
            <li>
                <a href="javascript:;"
                   {if (count($vo.child)==0)}
                   onclick="xadmin.add_tab('{$vo.title}','/admin/list/{$vo.id}/{$vo.title}')"
                   {/if}
                >
                <i class="iconfont left-nav-li" lay-tips="{$vo.title}">&#xe723;</i>
                <cite>{$vo.title}</cite>
                {if (count($vo.child)!=0)}
                <i class="iconfont nav_right">&#xe697;</i>
                {/if}

                </a>
                {if (count($vo.child)!=0)}
                <ul class="sub-menu">
                    {volist name="$vo.child" id="vs"}
                    <li>
                        <a onclick="xadmin.add_tab('{$vs.title}','/admin/list/{$vs.id}/{$vo.title}/{$vs.title}')">
                            <i class="iconfont">&#xe6a7;</i>
                            <cite>{$vs.title}</cite></a>
                    </li>
                    {/volist}
                </ul>
                {/if}
            </li>
            {/volist}

        </ul>
    </div>
</div>
{/block}